/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;


@Entity
public class ConfiguracionEjes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    private String designacion;
    private String imagen;
    private String tipo_vehiculo;
    private int nro_ejes;
    private int nro_ruedas;
    @OneToMany(cascade = CascadeType.PERSIST)
    private List<Eje> ls_ejes;
    
    @OneToMany(mappedBy = "configuracionEjes")
    private List<Vehiculo> ls_veVehiculos;

    public List<Vehiculo> getLs_veVehiculos() {
        return ls_veVehiculos;
    }

    public void setLs_veVehiculos(List<Vehiculo> ls_veVehiculos) {
        this.ls_veVehiculos = ls_veVehiculos;
    }
    
    public String getDesignacion() {
        return designacion;
    }

    public void setDesignacion(String designacion) {
        this.designacion = designacion;
    }

    public String getImagen() {
        return imagen;
    }

    public void setImagen(String imagen) {
        this.imagen = imagen;
    }

    public String getTipo_vehiculo() {
        return tipo_vehiculo;
    }

    public void setTipo_vehiculo(String tipo_vehiculo) {
        this.tipo_vehiculo = tipo_vehiculo;
    }

    public int getNro_ejes() {
        return nro_ejes;
    }

    public void setNro_ejes(int nro_ejes) {
        this.nro_ejes = nro_ejes;
    }

    public int getNro_ruedas() {
        return nro_ruedas;
    }

    public void setNro_ruedas(int nro_ruedas) {
        this.nro_ruedas = nro_ruedas;
    }

    public List<Eje> getLs_ejes() {
        return ls_ejes;
    }

    public void setLs_ejes(List<Eje> ls_ejes) {
        this.ls_ejes = ls_ejes;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ConfiguracionEjes)) {
            return false;
        }
        ConfiguracionEjes other = (ConfiguracionEjes) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return designacion;
    }
    
}
